Imports Microsoft.VisualBasic
Imports System.Collections.Generic

Namespace My
    Public Class MyBoolean
        Public Sub New()
        End Sub

        Public Sub New(ByVal b As Boolean)
            Me.Conditions.Add(b)
        End Sub

        Public Conditions As New List(Of Boolean)

        Public Sub Add(ByVal b As Boolean)
            Me.Conditions.Add(b)
        End Sub

        Public Sub AddOr(ByVal b As Boolean)
            Dim result As Boolean = Me.Value

            Me.Conditions.Clear()
            Me.Conditions.Add(result Or b)
        End Sub

        Public ReadOnly Property Value() As Boolean
            Get
                Dim result As Boolean = True

                For Each b As Boolean In Me.Conditions
                    result = result And b
                Next

                Return result
            End Get
        End Property
    End Class
End Namespace
